package com.shareppy.norman.sqlite.db;

import android.database.sqlite.SQLiteDatabase;

import com.shareppy.norman.core.db.ConnectionWrapper;

public class SQLiteConnection implements ConnectionWrapper{

	private SQLiteDatabase dbconnection;

	public SQLiteConnection(SQLiteDatabase dbconnection) {
		this.dbconnection = dbconnection;
	}

	@SuppressWarnings("unchecked")
	@Override
	public <T> T raw() {
		return (T) dbconnection;
	}

	@Override
	public void release() {
		if( dbconnection != null ){
			dbconnection.close();
		}
	}
}